package cn.zzp.system.mapper;

import cn.zzp.basic.mapper.BaseMapper;
import cn.zzp.system.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Administrator
 * @description: 角色mapper
 * @date 2022/8/2 17:45
 */
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 添加t_role_permission中间表
     * @param id
     * @param permissions
     */
    void addRolePermission(@Param("id")Long id, @Param("permissions") List<Long> permissions);

    /**
     * 添加t_role_menu中间表
     * @param id
     * @param menus
     */
    void addRoleMenu(@Param("id") Long id, @Param("menus") List<Long> menus);

    void deleteRolePermissionByRoleId(Long id);

    void deleteRoleMenuByRoleId(Long id);

    void deleteEmployeeRoleByRoleId(Long id);

}
